<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>高级设置 - 朋知云学</title>
    <link rel="stylesheet" href="../css/style.css">
    <link rel="stylesheet" href="../css/admin.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@4.1.1/animate.min.css">
    <style>
        .settings-container {
            padding: 20px;
            max-width: 800px;
            margin: 0 auto;
        }

        .settings-content {
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            padding: 30px;
            transition: all 0.3s ease;
        }

        .settings-header {
            margin-bottom: 30px;
            border-bottom: 2px solid #f0f0f0;
            padding-bottom: 20px;
        }

        .settings-header h2 {
            color: #333;
            font-size: 24px;
            margin-bottom: 10px;
            font-weight: 600;
        }

        .settings-header p {
            color: #666;
            font-size: 16px;
        }

        .settings-form .form-group {
            margin-bottom: 25px;
        }

        .settings-form label {
            display: block;
            margin-bottom: 8px;
            color: #444;
            font-weight: 500;
            font-size: 15px;
        }

        .settings-form .form-control {
            width: 100%;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 15px;
            transition: all 0.3s ease;
        }

        .settings-form .form-control:focus {
            border-color: #4a90e2;
            box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
            outline: none;
        }

        .settings-card {
            background: #f8f9fa;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            transition: all 0.3s ease;
            border: 1px solid #eee;
        }

        .settings-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
        }

        .settings-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

        .settings-card-title {
            font-size: 18px;
            color: #333;
            margin: 0;
            font-weight: 500;
        }

        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 26px;
        }

        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 34px;
        }

        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 20px;
            width: 20px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .toggle-switch input:checked + .toggle-slider {
            background-color: #4CAF50;
        }

        .toggle-switch input:checked + .toggle-slider:before {
            transform: translateX(24px);
        }

        .settings-actions {
            display: flex;
            justify-content: flex-end;
            gap: 15px;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid #eee;
        }

        .btn {
            padding: 12px 24px;
            border-radius: 6px;
            font-size: 15px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .btn-primary {
            background-color: #4a90e2;
            color: white;
            border: none;
        }

        .btn-primary:hover {
            background-color: #357abd;
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(74, 144, 226, 0.2);
        }

        .btn-secondary {
            background-color: #f8f9fa;
            color: #666;
            border: 1px solid #ddd;
        }

        .btn-secondary:hover {
            background-color: #e9ecef;
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
        }
        
        .alert {
            padding: 15px;
            margin-bottom: 20px;
            border-radius: 6px;
        }
        
        .alert-warning {
            background-color: #fff3cd;
            color: #856404;
            border: 1px solid #ffeeba;
        }
        
        .alert i {
            margin-right: 10px;
        }
        
        .mt-3 {
            margin-top: 15px;
        }
        
        .mb-4 {
            margin-bottom: 20px;
        }
        
        .input-group {
            display: flex;
            position: relative;
        }
    </style>
</head>
<body class="admin-body">
    <div class="admin-container">
        <!-- 侧边栏 -->
        <div class="admin-sidebar">
            <div class="admin-user">
                <div class="admin-user-info">
                    <div class="admin-username">管理员</div>
                    <div class="admin-role">超级管理员</div>
                </div>
            </div>
            
            <ul class="admin-sidebar-menu">
                <li class="admin-sidebar-item">
                    <a href="dashboard.html" class="admin-sidebar-link">
                        <i class="bi bi-speedometer2"></i>
                        <span>控制台</span>
                    </a>
                </li>
                <li class="admin-sidebar-item">
                    <a href="users.html" class="admin-sidebar-link">
                        <i class="bi bi-people"></i>
                        <span>用户管理</span>
                    </a>
                </li>
                <li class="admin-sidebar-item">
                    <a href="demands.html" class="admin-sidebar-link">
                        <i class="bi bi-list-check"></i>
                        <span>需求管理</span>
                    </a>
                </li>
                <li class="admin-sidebar-item">
                    <a href="applications.html" class="admin-sidebar-link">
                        <i class="bi bi-file-earmark-text"></i>
                        <span>申请审核</span>
                    </a>
                </li>
                <li class="admin-sidebar-item active">
                    <a href="settings.html" class="admin-sidebar-link">
                        <i class="bi bi-gear"></i>
                        <span>系统设置</span>
                    </a>
                </li>
                <li class="admin-sidebar-item">
                    <a href="../index.html" class="admin-sidebar-link">
                        <i class="bi bi-box-arrow-left"></i>
                        <span>返回前台</span>
                    </a>
                </li>
            </ul>
        </div>
        
        <!-- 主内容区 -->
        <div class="admin-content animate__animated animate__fadeIn">
            <div class="admin-header">
                <h1>高级设置</h1>
                <div class="admin-header-actions">
                    <div class="admin-notifications">
                        <i class="bi bi-bell"></i>
                        <span class="badge">3</span>
                    </div>
                </div>
            </div>
            
            <!-- 设置内容 -->
            <div class="settings-container">
                <div class="settings-content">
                    <div class="settings-header">
                        <h2>高级设置</h2>
                        <p>配置系统的高级选项和功能</p>
                    </div>
                    
                    <div class="alert alert-warning">
                        <i class="bi bi-exclamation-triangle"></i>
                        警告：这些设置可能会影响系统的稳定性和性能，请谨慎修改。
                    </div>
                    
                    <div class="settings-card">
                        <div class="settings-card-header">
                            <h3 class="settings-card-title">开发者模式</h3>
                            <label class="toggle-switch">
                                <input type="checkbox">
                                <span class="toggle-slider"></span>
                            </label>
                        </div>
                        <p>启用开发者模式，显示详细的错误信息和调试工具</p>
                    </div>
                    
                    <div class="settings-card">
                        <div class="settings-card-header">
                            <h3 class="settings-card-title">缓存</h3>
                            <label class="toggle-switch">
                                <input type="checkbox" checked>
                                <span class="toggle-slider"></span>
                            </label>
                        </div>
                        <p>启用系统缓存，提高性能</p>
                    </div>
                    
                    <div class="form-group">
                        <label for="cache-lifetime">缓存生命周期（分钟）</label>
                        <input type="number" id="cache-lifetime" class="form-control" value="60">
                    </div>
                    
                    <div class="mt-3 mb-4">
                        <button type="button" class="btn btn-secondary">
                            <i class="bi bi-trash"></i> 清除缓存
                        </button>
                    </div>
                    
                    <div class="form-group">
                        <label for="api-key">API密钥</label>
                        <div class="input-group">
                            <input type="text" id="api-key" class="form-control" value="sk_test_51HZ8wDJK9csLn" readonly>
                            <button type="button" class="btn btn-secondary">重新生成</button>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label for="log-level">日志级别</label>
                        <select id="log-level" class="form-control">
                            <option>错误</option>
                            <option>警告</option>
                            <option selected>信息</option>
                            <option>调试</option>
                        </select>
                    </div>
                    
                    <div class="settings-card">
                        <div class="settings-card-header">
                            <h3 class="settings-card-title">SMTP设置</h3>
                        </div>
                        <div class="form-group">
                            <label for="smtp-host">SMTP服务器</label>
                            <input type="text" id="smtp-host" class="form-control" value="smtp.example.com">
                        </div>
                        <div class="form-group">
                            <label for="smtp-port">SMTP端口</label>
                            <input type="number" id="smtp-port" class="form-control" value="587">
                        </div>
                        <div class="form-group">
                            <label for="smtp-username">SMTP用户名</label>
                            <input type="text" id="smtp-username" class="form-control" value="user@example.com">
                        </div>
                        <div class="form-group">
                            <label for="smtp-password">SMTP密码</label>
                            <input type="password" id="smtp-password" class="form-control" value="password">
                        </div>
                    </div>
                    
                    <div class="settings-actions">
                        <a href="settings.html" class="btn btn-secondary">返回设置</a>
                        <button type="submit" class="btn btn-primary">保存设置</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <script src="../js/main.js"></script>
    <script src="../js/settings.js"></script>
</body>
</html>